﻿<?php
/**
 * @version $Id$
 * @package    Jmonoslideshow
 * @author     Matthieu BARBE {@link http://www.ccomca.com}
 * @author     Created on 21-Apr-2009
 */

//-- No direct access

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

class JElementTypeMedia extends JElement
{
	/**
	 * Element name
	 * @access	protected
	 * @var		string
	 */
	var	$_name = 'TypeMedia';

	function fetchElement( $name, $value, &$node, $control_name )
	{
		$default       = '- ' . JText::_( 'COM_JMONOSLIDESHOW_ALL' ).' -' ;
		
		$res = array();
		
		array_unshift($res, JHTML::_('select.option', '2', JText::_( 'COM_JMONOSLIDESHOW_VIDEO' )));
		array_unshift($res, JHTML::_('select.option', '1', JText::_( 'COM_JMONOSLIDESHOW_ANIMATION_FLASH' ) ));
		array_unshift($res, JHTML::_('select.option', '0', JText::_( 'COM_JMONOSLIDESHOW_IMAGE' ) ));
		array_unshift($res, JHTML::_('select.option', 'all', $default ));
		
		 
		 return JHTML::_('select.genericlist',  $res, ''.$control_name.'['.$name.'][]', 
      'class="inputbox" size="4" multiple="multiple"',
      'value', 'text', $value, $control_name.$name);
	}
}